<?php
/**
 * Created by PhpStorm.
 * User: DaibiDaddy
 * Date: 2016/5/24
 * Time: 17:14
 */

namespace App\Base;

use App\Entity\AdminMenu;
use Doctrine\ODM\MongoDB\DocumentManager;
use Doctrine\ODM\MongoDB\Repository\DocumentRepository;
use Symfony\Component\Serializer\Normalizer\CustomNormalizer;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
use Symfony\Component\Serializer\SerializerInterface;

class BaseRepository extends DocumentRepository
{
    public $normalizer;
    /**@var  $serializer SerializerInterface*/
    public function __construct(
        DocumentManager $dm
        ,NormalizerInterface $normalizer
    )
    {
        parent::__construct($dm, $dm->getUnitOfWork(),$dm->getClassMetadata(AdminMenu::class));
        $this->normalizer = $normalizer;
    }
}
